package models;

import java.util.Vector;

import javax.swing.AbstractListModel;
import javax.swing.ComboBoxModel;
import javax.swing.event.ListDataListener;

public class OdontologosListModel extends AbstractListModel implements ComboBoxModel {
	
	private Odontologo selectedOdontologo;
	private Vector <Odontologo> odontologos;

	public OdontologosListModel(Vector<Odontologo> odontologos, Odontologo seleccionado) {
		super();
		this.odontologos = odontologos;
		this.selectedOdontologo= seleccionado;
	}

	@Override
	public Odontologo getSelectedItem() {
		return selectedOdontologo;
	}

	public void setSelectedItem(Object seleccionado) {
		selectedOdontologo=(Odontologo) seleccionado;
	}

	@Override
	public void addListDataListener(ListDataListener l) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public Odontologo getElementAt(int index) {
		
		return odontologos.elementAt(index);
	}

	@Override
	public int getSize() {
		
		return odontologos.size();
	}

	@Override
	public void removeListDataListener(ListDataListener l) {
		// TODO Auto-generated method stub
		
	}

	


}
